
OBJS		= squid_ldap_auth.o
LIBS		= -lldap -llber
LDAP_EXE	= squid_ldap_auth

prefix		= @prefix@
exec_prefix	= @exec_prefix@
exec_suffix	= @exec_suffix@
cgi_suffix	= @cgi_suffix@
top_srcdir	= @top_srcdir@
bindir		= @bindir@
libexecdir	= @libexecdir@
sysconfdir	= @sysconfdir@
localstatedir	= @localstatedir@
srcdir		= @srcdir@
VPATH		= @srcdir@

CC		= @CC@
MAKEDEPEND	= @MAKEDEPEND@
INSTALL		= @INSTALL@
INSTALL_BIN	= @INSTALL_PROGRAM@
INSTALL_FILE	= @INSTALL_DATA@
INSTALL_SUID	= @INSTALL_PROGRAM@ -o root -m 4755
RANLIB		= @RANLIB@
LN_S		= @LN_S@
PERL		= @PERL@
CRYPTLIB	= @CRYPTLIB@
REGEXLIB	= @REGEXLIB@
PTHREADLIB	= @PTHREADLIB@
MALLOCLIB	= @LIB_MALLOC@
AC_CFLAGS	= @CFLAGS@
LDFLAGS		= @LDFLAGS@
XTRA_LIBS	= @XTRA_LIBS@
XTRA_OBJS	= @XTRA_OBJS@
MV		= @MV@
RM		= @RM@
SHELL		= /bin/sh


all: $(LDAP_EXE)

$(LDAP_EXE): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

install-mkdirs:
	-@if test ! -d $(prefix); then \
		echo "mkdir $(prefix)"; \
		mkdir $(prefix); \
	fi
	-@if test ! -d $(libexecdir); then \
		echo "mkdir $(libexecdir)"; \
		mkdir $(libexecdir); \
	fi

# Michael Lupp <mike@nemesis.saar.de> wants to know about additions
# to the install target.
install: all install-mkdirs
	@for f in $(LDAP_EXE); do \
		if test -f $(libexecdir)/$$f; then \
			echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
			$(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
		fi; \
		echo $(INSTALL_BIN) $$f $(libexecdir); \
		$(INSTALL_BIN) $$f $(libexecdir); \
		if test -f $(libexecdir)/-$$f; then \
			echo $(RM) -f $(libexecdir)/-$$f; \
			$(RM) -f $(libexecdir)/-$$f; \
		fi; \
	done

clean:
	-$(RM) -f $(OBJS)
	-$(RM) -f $(LDAP_EXE)

distclean: clean
	-$(RM) -f Makefile
